import { Input } from 'antd';
import { debounce } from 'lodash';

interface ScanInputProps {
    onChange: (v) => void;
}

export const ScanInput = (props: ScanInputProps) => {
    const changeInput = (e) => {
        console.log('whx input', e);
        props?.onChange?.(e?.target?.value);
    };
    return <Input onChange={debounce(changeInput, 500)}/>
};

export default ScanInput;